// <!--  <ul id="list_thinking" >-->
// <!--    <li> <a href="" target="_blank" ><img width="48" height="48" alt="beata娟" id="face_4920841" class="pic_border pf fl lazy_img"  src="images/4920841.jpg"/></a> <span class="txt_thinking fr digest" > 【写给我最美好的年华】这么戳人泪点的征文题目啊，这么伤感怀旧的BGM...“放心去飞，勇敢地去追……说好了这一次不掉眼泪”...不光是这个班要毕业了... <br/>-->
//     <!--      <a href="#" title="阅读全文" target="_blank" class="gray normal">阅读全文&raquo;</a></span>-->
// <!--      <div class="txt_from"> <span><a href="#" target="_blank">漫画之迷</a> </span> 来自 <a href="#" class="noline" target="_blank">外企面试英语2月班</a> </div>-->
// <!--    </li>-->
// <!--    <li> <a href="#" target="_blank" ><img width="48" height="48" alt="jane20110706" id="face_9221006" class="pic_border pf fl lazy_img"  src="images/9221006.jpg"/></a> <span class="txt_thinking fr digest" > 不敢相信，查了两遍后，终于确信，我是过了四级了。不容易，考了几次，终于过了。不过，还真的得感谢：谢老师的精采讲课，水母老师和助教平常的督促哦... <br/>-->
//     <!--      <a href="###" title="阅读全文" target="_blank" class="gray normal">阅读全文&raquo;</a></span>-->
// <!--      <div class="txt_from"> <span><a href="#" target="_blank">漫画之迷</a> </span> 来自 <a href="#" class="noline" target="_blank">英语四级暑期班</a> </div>-->
// <!--    </li>-->
// <!--    <li> <a href="#" target="_blank" ><img width="48" height="48" alt="浅jessica" id="face_3479036" class="pic_border pf fl lazy_img"  src="images/3479036.jpg"/></a> <span class="txt_thinking fr digest" > 终于在最后一天圆满完成了我的BEC初中级课程，作为这个班的班长，我觉得我在这个班级还是收获了很多，知识，朋友...看着147个课件后面的已学习，真的... <br/>-->
//     <!--      <a href="#" title="阅读全文" target="_blank" class="gray normal">阅读全文&raquo;</a></span>-->
// <!--      <div class="txt_from"> <span><a href="#" target="_blank">漫画之迷</a> </span> 来自 <a href="#" class="noline" target="_blank">BEC初中级6月班</a> </div>-->
// <!--    </li>-->
// <!--    <li> <a href="#" target="_blank" ><img width="48" height="48" alt="我才是玛奇朵" id="face_10140568" class="pic_border pf fl lazy_img"  src="images/10140568.jpg"/></a> <span class="txt_thinking fr digest" > 这一次是第一次接触沪江，其实早就知道 但是从来没仔细看过~有一天我去帮同学拿快递，她报了沪江的六级班。当时袋子破掉了，我看到里面是六级的讲义。... <br/>-->
//     <!--      <a href="/feedback/2113" title="阅读全文" target="_blank" class="gray normal">阅读全文&raquo;</a></span>-->
// <!--      <div class="txt_from"> <span><a href="#" target="_blank">漫画之迷</a> </span> 来自 <a href="#" class="noline" target="_blank">英语四级冲关班</a> </div>-->
// <!--    </li>-->
// <!--  </ul>-->
function upsert(){
    //alert(111)
    var commentContent = $('input[name="commentContent"]').val()
    //console.log("===" + $('input[name="commentContent"]'))
    //console.log("===" +  commentContent)


    // 所有验证判断都通过后，执行保存操作
    var formData = new FormData();
    // 把需要的参数拼一下
    formData.append("commentContent",commentContent)
    console.log(commentContent);
    $.ajax({
        url: "/upsertcomment",
        type:"post",
        contentType:false,  // 告诉jquery不要设置Content-Type请求头
        data:formData,
        async:true,
        processData: false,// 告诉jquery不要处理发送的数据
        success:function (data) {
            //window.location.reload();
        }
    })
}
$.ajax({
    url: "/findall",
    dataType: "json",
    success: function (data) {
        console.log(data);
        var html = '';
        if (data.code == 0){
            for(var i=0;i<data.data.length;i++){
                html = html + "<div id='thingk_title' class='bg_all mb20'><a href='#' title='更多学员说' class='fr gray noline' target='_blank'></a></div>";
                html = html + "<ul id='list_thinking' ><li>";
                //html = html + " <a href='' target='_blank' ><span width='48' height='48' id='face_4920841'/>"
                //html = html + "<img width='50' height='50' id='face_4920841' class='pic_border pf fl lazy_img' src=' "+ data.data[i].comment_user_img + "'/>";
                //html = html + "</a> <span class='txt_thinking fr digest' >"
                html = html + data.data[i].comment_content;
                console.log(data.data[i].comment_content)

                html = html + "<a href='#' title='查看评分' target='_blank' class='gray normal'>查看评论&raquo;</a></span>";
                html = html + "<div class='txt_from'> <span><a href='#' target='_blank'>";
                html = html + data.data[i].comment_create_time;
                html = html + "</a> </span>";
                html = html + "来自 <a href='#' class='noline' target='_blank'>";
                html = html + data.data[i].comment_user_name;
                html = html + "</a> </div></li>";
                html = html + "</ul>";
            }
        } else {
            console.log(data.code)
            console.log(data.message)
        }
        $('#thinking').html(html);

    }
});